Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose 'data' (query-manager) as a top-level object #2246

Closed
wants to merge 2 commits into from

Conversation

antazoey
Copy link
Member

What I did

Allows

from ape import queries

How I did it

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey
Copy link
Member Author

maybe querier makes more sense but not an easy word to remember how to type

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I originally added this, I meant it as an internal-only manager to use

What would be the use case for exposing this?

src/ape/__init__.py Outdated Show resolved Hide resolved
@antazoey
Copy link
Member Author

antazoey commented Aug 26, 2024

What would be the use case for exposing this?

Users just trying to work with query manager more directly, like especially when you are trying to use a specific engine.
One example is even testing a query-engine plugin directly.

Otherwise, I can do this, but it just felt awkward:

@pytest.fixture
def query_engine():
    return ManagerAccessMixin.query_manager.engines["etherscan"]

@antazoey antazoey changed the title feat: expose 'queries' as a top-level object feat: expose 'data' (query-manager) as a top-level object Aug 26, 2024
@antazoey antazoey closed this Sep 11, 2024
@antazoey antazoey deleted the feat/queries-toplvl branch September 11, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants